<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
  const PI = 3.14159265358
  if(true){
    // const a;//编译就报错，const修饰的变量必须赋值，和java的final有区别！
    //暂时性死区
    console.log(PI);
    const PI = 'a'
  }
</script>
</body>
</html>